<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of mdnpost</title>
  <meta name="keywords" content="mdnpost">
  <meta name="description" content="MDNPOST Computes the posterior probability for each MDN mixture component.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../menu.html">Home</a> &gt;  <a href="#">ReBEL-0.2.7</a> &gt; <a href="#">netlab</a> &gt; mdnpost.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../menu.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="menu.html">Index for .\ReBEL-0.2.7\netlab&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>mdnpost
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>MDNPOST Computes the posterior probability for each MDN mixture component.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function [post, a] = mdnpost(mixparams, t) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment">MDNPOST Computes the posterior probability for each MDN mixture component.

    Description
    POST = MDNPOST(MIXPARAMS, T) computes the posterior probability
    P(J|T) of each data vector in T under the Gaussian mixture model
    represented by the corresponding entries in MIXPARAMS. Each row of T
    represents a single vector.

    [POST, A] = MDNPOST(MIXPARAMS, T) also computes the activations A
    (i.e. the probability P(T|J) of the data conditioned on each
    component density) for a Gaussian mixture model.

    See also
    <a href="mdngrad.html" class="code" title="function g = mdngrad(net, x, t)">MDNGRAD</a>, <a href="mdnprob.html" class="code" title="function [prob,a] = mdnprob(mixparams, t)">MDNPROB</a></pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="mdnprob.html" class="code" title="function [prob,a] = mdnprob(mixparams, t)">mdnprob</a>	MDNPROB Computes the data probability likelihood for an MDN mixture structure.</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="mdngrad.html" class="code" title="function g = mdngrad(net, x, t)">mdngrad</a>	MDNGRAD Evaluate gradient of error function for Mixture Density Network.</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [post, a] = mdnpost(mixparams, t)</a>
0002 <span class="comment">%MDNPOST Computes the posterior probability for each MDN mixture component.</span>
0003 <span class="comment">%</span>
0004 <span class="comment">%    Description</span>
0005 <span class="comment">%    POST = MDNPOST(MIXPARAMS, T) computes the posterior probability</span>
0006 <span class="comment">%    P(J|T) of each data vector in T under the Gaussian mixture model</span>
0007 <span class="comment">%    represented by the corresponding entries in MIXPARAMS. Each row of T</span>
0008 <span class="comment">%    represents a single vector.</span>
0009 <span class="comment">%</span>
0010 <span class="comment">%    [POST, A] = MDNPOST(MIXPARAMS, T) also computes the activations A</span>
0011 <span class="comment">%    (i.e. the probability P(T|J) of the data conditioned on each</span>
0012 <span class="comment">%    component density) for a Gaussian mixture model.</span>
0013 <span class="comment">%</span>
0014 <span class="comment">%    See also</span>
0015 <span class="comment">%    MDNGRAD, MDNPROB</span>
0016 <span class="comment">%</span>
0017 
0018 <span class="comment">%    Copyright (c) Ian T Nabney (1996-2001)</span>
0019 <span class="comment">%    David J Evans (1998)</span>
0020 
0021 [prob a] = <a href="mdnprob.html" class="code" title="function [prob,a] = mdnprob(mixparams, t)">mdnprob</a>(mixparams, t);
0022 
0023 s = sum(prob, 2);
0024 <span class="comment">% Set any zeros to one before dividing</span>
0025 s = s + (s==0);
0026 post = prob./(s*ones(1, mixparams.ncentres));</pre></div>
<hr><address>Generated on Tue 26-Sep-2006 10:36:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>